<template>
  <div class="form-radio-group">
    <a-radio-group
      v-model="formData[name]"
      :options="options"
      :disabled="disabled"
    />
  </div>
</template>
<script lang="ts">
import { Vue, Component, Prop } from 'vue-property-decorator'

@Component
export default class RadioGroup extends Vue {
  @Prop() name!: any // key
  @Prop({ type: Boolean, default: false }) disabled!: boolean
  @Prop({ type: Object, default: () => ({}) }) formData!: { [key: string]: any }
  @Prop({ type: Array, default: () => [] }) options!: any[]
}
</script>
<style lang="less" scoped>
.form-radio-group {
  background: #f1f1f1;
  display: flex;
  padding: 8px;
  width: 100%;
}
</style>
